#ifndef CPOLYGON_H
#define CPOLYGON_H

class CPolygon {
  protected:
    int width, height;
  public:
	 virtual int area()=0;
     void set_values (int a, int b)
      { width=a; height=b; }
  };

class CRectangle: public CPolygon {
  public:
    int area ()
      { return (width * height); }
  };

class CTriangle: public CPolygon {
  public:
    int area ()
      { return (width * height / 2); }
  };

#endif